
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.sopt.dev.ImgKnight.monitor.Monitor;

public class MonitorWrapper {

	public static void main(String[] args) {
		String entryAddress = null;
		String portNum = null;
		if( args.length > 1 ) {
			entryAddress = args[0];
			portNum = args[1];
		}
		Display display = new Display();
        Monitor application = new Monitor();
        Shell shell = application.open(entryAddress, portNum, display);
        if( shell != null ) {
        	while( !shell.isDisposed() ) {
            	if( !display.readAndDispatch() )
            		display.sleep();
            }
            application.close();
            display.dispose();
        }
	}
	
}